﻿namespace Jinndev {

    /// <summary>
    /// 地图层级中的一个物体，属于MapLayerData
    /// </summary>
    [System.Serializable]
    public class MapObjData {

        /// <summary> 对应图片id </summary>
        public string id;

        /// <summary> 计算坐标用的索引值 </summary>
        public Int2 index;

        /// <summary> 离地高度，用于计算挂载墙上、放在其他物体上时的遮挡关系 </summary>
        public float height;

        /// <summary> 旋转角度 </summary>
        public MapObjRotation rotation;

        /// <summary> 槽位ID </summary>
        public string slot;

        public MapObjData() {

        }

        public MapObjData(TileConfig config, Int2 index, MapObjRotation rotation) {
            this.id = config.id;
            this.height = config.height;
            this.index = index;
            this.rotation = rotation;
        }

    }

}
